<template>
   <div class="top-container">
    <div class="left-box">
      <div class="icon-wrapper">
      </div>
      <div class="history-wrapper">
        <span class="iconfont icon-arrow-lift">晚</span>
        <span class="iconfont icon-arrow-right">晚</span>
      </div>
    </div>
    <div class="right-box">
     <div class="demo-input-suffix">
         <el-input
          placeholder="回车搜索嗷"
          prefix-icon="el-icon-search"
          v-model="value"
          @keyup.enter="open1"
          >
         </el-input>
      </div>
    </div>
  </div>
</template>

<script>

export default {
  name: 'Top',
  props: {
   
  },
  data() {
    return {
      value:''
    }
  },
  methods: {
      open1(){
        if(this.value==''){
          // this.$message.warning('')
           this.$message({
          showClose: true,
          message: '忘记输入内容啦笨居',
          type: 'success'
        });
        }else{
          this.$router.push('/result?id='+this.value)
        }
      }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
